package io.ext.dubbo;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.context.annotation.ImportResource;

@SpringBootApplication
@ImportResource("classpath:dubbo-config.xml")
public class ConsumerApp
{
    public static void main(String[] args) throws Exception{
        final ConfigurableApplicationContext context = SpringApplication.run(ConsumerApp.class, args);
        final SomeService s = context.getBean(SomeService.class);
        System.out.println(System.currentTimeMillis());
        System.out.println(s.foo1());
        System.out.println(System.currentTimeMillis());
        System.out.println(s.foo1());
        System.out.println(System.currentTimeMillis());
        System.out.println(s.foo1());
        System.out.println(System.currentTimeMillis());
        System.out.println(s.foo1());
        System.out.println(System.currentTimeMillis());
        System.out.println(s.foo1());
        System.out.println(System.currentTimeMillis());
        System.out.println(s.foo1());
        System.out.println(System.currentTimeMillis());
    }
}
